<template>
  <SlidePuzzleVerification
    ref="verify"
    :imgs="imgs"
    @finish="finish"
  ></SlidePuzzleVerification>
  <div @click="open">打开</div>
</template>

<script>
import { ref } from 'vue'
import SlidePuzzleVerification from "./SlidePuzzleVerification.vue"
export default {

  components: { "SlidePuzzleVerification": SlidePuzzleVerification },
  setup () {
    const verify = ref(null)
    const imgs = ref(['/src/components/cloud.jpg', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcdn.layui.com%2Favatar%2F54267528.jpg%3Ft%3D1584703923649&refer=http%3A%2F%2Fcdn.layui.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1624066370&t=8f57c9f420859b8d179cde0bdce5ee9b'])
    function open () {
      verify.value.openModel()
    }
    function finish (res) {
      console.log("finish", res)
    }

    return {
      verify,
      imgs,
      open,
      finish,
    }
  }
}
</script>
